package com.dailyblue.cloud.bookstore.commons.bean;

import java.io.Serializable;

/**
 * 
 * @TableName books
 */
public class Books implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 
     */
    private String bookname;

    /**
     * 
     */
    private String bookimg;

    /**
     * 
     */
    private Double bookprice;

    /**
     * 
     */
    private String bookdesc;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 
     */
    public String getBookname() {
        return bookname;
    }

    /**
     * 
     */
    public void setBookname(String bookname) {
        this.bookname = bookname;
    }

    /**
     * 
     */
    public String getBookimg() {
        return bookimg;
    }

    /**
     * 
     */
    public void setBookimg(String bookimg) {
        this.bookimg = bookimg;
    }

    /**
     * 
     */
    public Double getBookprice() {
        return bookprice;
    }

    /**
     * 
     */
    public void setBookprice(Double bookprice) {
        this.bookprice = bookprice;
    }

    /**
     * 
     */
    public String getBookdesc() {
        return bookdesc;
    }

    /**
     * 
     */
    public void setBookdesc(String bookdesc) {
        this.bookdesc = bookdesc;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Books other = (Books) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBookname() == null ? other.getBookname() == null : this.getBookname().equals(other.getBookname()))
            && (this.getBookimg() == null ? other.getBookimg() == null : this.getBookimg().equals(other.getBookimg()))
            && (this.getBookprice() == null ? other.getBookprice() == null : this.getBookprice().equals(other.getBookprice()))
            && (this.getBookdesc() == null ? other.getBookdesc() == null : this.getBookdesc().equals(other.getBookdesc()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBookname() == null) ? 0 : getBookname().hashCode());
        result = prime * result + ((getBookimg() == null) ? 0 : getBookimg().hashCode());
        result = prime * result + ((getBookprice() == null) ? 0 : getBookprice().hashCode());
        result = prime * result + ((getBookdesc() == null) ? 0 : getBookdesc().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", bookname=").append(bookname);
        sb.append(", bookimg=").append(bookimg);
        sb.append(", bookprice=").append(bookprice);
        sb.append(", bookdesc=").append(bookdesc);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}